home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Technical Docs / Apple II Technical Notes / Technical Notes (Text) / IIGS / TN.IIGS.072 < prev    next >
Encoding:
Text File  |  1989-11-09  |  3.4 KB  |  92 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Apple IIGS
  8. #72:    QuickDraw II Quirks
  9.  
  10. Written by:    Dave Lyons                                       November 1989
  11.  
  12. This Technical Note points out some things things you need to watch out for 
  13. when using ScrollRect and when using QuickDraw II's FastPort-aware and 
  14. Shadowing modes under System Software 5.0.2.
  15. _____________________________________________________________________________
  16.  
  17.  
  18. Shadowing
  19.  
  20. Bit 15 of the MasterSCB parameter to QDStartUp requests that QuickDraw II use 
  21. the memory at $012000 to shadow onto the real screen memory at $E12000.  (This 
  22. speeds up QuickDraw II, since memory in bank $01 can be read at full speed.)
  23.  
  24. QDShutDown on ROM 01 machines does not dispose of the $012000 memory block if 
  25. it was allocated.  If your application is about to quit anyway, it doesn't 
  26. make any difference.
  27.  
  28. But if your application restarts QuickDraw II (for example, because it's 
  29. switching between 320 mode and 640 mode), QDStartUp is unable to reallocate 
  30. the shadow memory, since it's already allocated.  At this point, QuickDraw II 
  31. is no longer shadowing, and the lost speed advantage is not your biggest 
  32. problem:  if you had any windows open, their ports' pixel map pointers are 
  33. still pointing into bank $01, where any drawing done is now invisible.
  34.  
  35. A solution to this problem is to manually dispose of the $012000 memory after 
  36. QDShutDown if your application is affected.
  37.  
  38.            pha
  39.            _GetMasterSCB
  40.            _QDShutDown
  41.            pla
  42.            bpl    WasNotShadow      ;bit 15 was off--not shadowing
  43.            pha
  44.            pha
  45.            pea    $0001
  46.            pea    $2000
  47.            _FindHandle
  48.            plx
  49.            pla
  50.            bcs    WasNotShadow
  51.            pha
  52.            phx
  53.            _DisposeHandle
  54.  
  55. WasNotShadow                        ;now it's okay to restart QuickDraw
  56.  
  57.  
  58. FastPort-Aware Anomaly
  59.  
  60. When the FastPort-aware bit is turned on in the MasterSCB parameter to 
  61. QDStartUp, DrawPicture does not notice changes in the pen pattern.  If your 
  62. application uses pictures, either directly or indirectly (i.e., by printing to 
  63. the ImageWriter driver), you may need to leave FastPort-aware mode turned off 
  64. to get the expected behavior.
  65.  
  66.  
  67. FastFont and Large Pixel Maps
  68.  
  69. FastFont does not work correctly when drawing past the first 64K of a pixel 
  70. map.  If you are drawing text that uses FastFont (i.e., Shaston 8), you can 
  71. avoid this problem by using a non-rectangular clipRgn.
  72.  
  73.  
  74. ScrollRect Can Hang
  75.  
  76. Under certain conditions, ScrollRect hangs.  For the hang to occur, the port's 
  77. visRgn must be non-rectangular and the scroll must be with a positive dY value 
  78. small enough that some pixels are actually moved on the screen.
  79.  
  80. Since SetContentOrigin calls ScrollRect, this problem can affect you even if 
  81. you don't call ScrollRect directly.  For example, the hang can occur when a 
  82. word processor's Find dialog obscures part of a document window and the search 
  83. wraps back to the beginning of the document .
  84.  
  85. One way to avoid the problem is to call SetContentOrigin2 with 
  86. ScrollFlag = False and then redraw the window contents as appropriate.
  87.  
  88.  
  89. Further Reference
  90. _____________________________________________________________________________
  91.     o    Apple IIGS Toolbox Reference, Volumes 1 and 3
  92.